<div ms-controller="groupDetail" class="col-md-9">
    <nav>
        <ul class="pager">
            <li class="previous" ms-click="showGroupListPage()"><a href="javascript:void(0)"><span
                    aria-hidden="true">&larr;</span> 返回</a></li>
        </ul>
    </nav>
    <h2>小组成员管理</h2>
    <table class="table table-striped">
        <tr>
            <th>ID</th>
            <th>用户名</th>
            <th>真实姓名</th>
            <th>加入时间</th>
            <th></th>
        </tr>
        <tr ms-repeat="memberList">
            <td>{{ el.user.id }}</td>
            <td>{{ el.user.username }}</td>
            <td>{{ el.user.real_name }}</td>
            <td>{{ el.join_time|date("yyyy-MM-dd HH:mm:ss")}}</td>
            
            <td>
                <button class="btn-sm btn-info" ms-click="promotAsAdmin(el)">设为管理员</button>
                <button class="btn-sm btn-danger" ms-click="removeMember(el)">移除</button>
            </td>
        </tr>
    </table>
    <div class="text-right">
        页数：{{ page }}/{{ totalPage }}&nbsp;&nbsp;
        <button ms-attr-class="getBtnClass('pre')" ms-click="getPrevious">上一页</button>
        <button ms-attr-class="getBtnClass('next')" ms-click="getNext">下一页</button>
    </div>
    <h2>修改小组信息</h2>

    <form id="edit_group_form">
        <div class="col-md-12">
            <div class="form-group"><label>小组名</label>
                <input type="text" name="name" class="form-control" ms-duplex="name"
                        data-error="请填写小组名(名称不能超过20字)" maxlength="20" required>
                <div class="help-block with-errors"></div>
            </div>
        </div>
        <div class="col-md-12">
            <div class="form-group"><label>描述</label>
                <textarea rows="3" name="description" class="form-control" ms-duplex="description"
                          data-error="请填写描述" maxlength="300" required>
                </textarea>
                <div class="help-block with-errors"></div>
            </div>
        </div>
        <div class="col-md-9">
            <div class="form-group">
                <label>加入小组设置</label><br>
                <label><input type="radio" name="join_group_setting" value="0" ms-duplex-string="checkedSetting"><small>允许任何人加入</small></label>
                <label><input type="radio" name="join_group_setting" value="1" ms-duplex-string="checkedSetting"><small>提交请求后管理员审核</small></label>
                <label><input type="radio" name="join_group_setting" value="2" ms-duplex-string="checkedSetting"><small>不允许任何人加入</small></label>
            </div>
            
        </div>
        <div class="col-md-3 form-group">
            <label>前台是否可见</label><br>
            <label><input type="checkbox" ms-duplex-checked="visible">
                <small>可见</small>
            </label>
        </div>
        <div class="col-md-12">
            <button class="btn btn-primary" type="submit">提交</button>
        </div>
    </form>
</div>
<script src="/static/js/app/admin/group/groupDetail.js"></script>
